Network information detection apparatus and method

ABSTRACT

Search IP addresses are detected from among a preset number of selected IP addresses available on the network, and DNS query message and ICMP echo request message are transmitted at a time to the detected search IP addresses DNS server and router IP addresses are detected from response messages in response to the DNS query message and the ICMP echo request message.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates generally to a network system, andmore particularly to a network information detection apparatus for andmethod of automatically acquiring network information.

[0003] 2. Description of the Related Art

[0004] To connect a computer to a network, one must set networkinformation such as router IP (Internet Protocol) address and DNS(Domain Name System) IP address to the computer. While such informationmay be set manually, manual setting requires network knowledge and timeand effort must be expended to investigate network information.Erroneous setting of network information may send the entire networkinto a tailspin.

[0005] In the presence of a DHCP (Dynamic Host Configuration Protocol)server, on the other hand, network information can be acquired from theDHCP server. To thus allow automatic acquisition of network information,however, a server must be built that is intended to provide networkinformation.

[0006] Japanese Patent Application Unexamined Publication No.2002-190811 discloses as an example a method of automatically acquiringIP addresses of networked devices. According to the prior art method,when network information cannot be obtained from DHCP server, aneffective subnet is determined by analyzing network traffic (seeparagraph Nos. 0018 to 0021) and, within the subnet, the default routerand the DNS server are detected respectively using an ICMP (InternetControl Message Protocol) router selection message and a SNMP (SimpleNetwork Management Protocol) DNS find request (paragraph Nos. 0025 to0027).

[0007] However, the IP configuration automatic acquisition method asdisclosed in the above publication uses the router IP address detectionmethod described in RFC1256 as it is and does not consider speeding uprouter detection. Besides, some routers do not support ICMP RouterSelection, occasionally resulting in routers not being detected by theprior art method.

[0008] Similarly, the aforementioned prior art method does not considerspeeding up DNS server detection. Besides, some DNS servers do notsupport SNMP's DNS find request, occasionally resulting in DNS serversnot being detected.

SUMMARY OF THE INVENTION

[0009] It is therefore an object of the present invention to provide anetwork information detection apparatus and method capable ofautomatically and rapidly acquiring network information without needingany server functions for providing network information.

[0010] It is another object of the present invention to provide anetwork information detection apparatus and method capable of reliablyacquiring network information.

[0011] According to a first aspect of the present invention, an IPaddress of a device connected to a network is detected by the following:a search IP address detector for detecting at least one search IPaddress from IP addresses which are selected every a predeterminednumber of IP addresses as a unit from possible IP addresses on thenetwork; an IP address detector for detecting an IP address of a targetdevice from the at least one search IP address detected; and acontroller for terminating a network information detection operationeither when all possible 11 addresses on the network have been selectedor when the IP address of the target device has been detected.

[0012] According to a second aspect of the present invention, an IPaddress on a network including at least a DNS (Domain Name System)server is detected by the following: a search IP address detector fordetecting at least one search IP address from possible IP addresses onthe network; a DNS message communication section for sending a DNS querymessage to the at least one search IP address and receiving a responsemessage to the DNS query message; and a DNS server detector fordiscriminating a DNS response message from the response message todetect an IP address of a DNS server originating the DNS responsemessage.

[0013] The search IP address detector may send an ARP (AddressResolution Protocol) request at a time to IP addresses which areselected every a predetermined number of IP addresses as a unit from thepossible IP addresses on the network, and detect the at least one searchIP address from an ARP response to the ARP request.

[0014] The DNS query message may be a message with resetting QR bit ofDNS protocol header, which is a message of at least one type selectedfrom a group of standard query, inverse query, server status request andupdate.

[0015] The network information detection apparatus as described abovefurther includes an ICMP message communication section for sending anICMP echo query message to the at least one search IP address andreceiving an ICMP response message to the ICMP echo query message; and arouter detector for detecting an IP address of a router originating theICMP response message. The ICMP response message may be one of an ICMPredirect request message and an ICMP time exceed message.

BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and other objects, aspects, features and advantages ofthe present invention will become more apparent from the followingdetailed description when taken in conjunction with the accompanyingdrawings, in which:

[0017]FIG. 1 is a schematic configuration diagram showing an example ofnetwork including a network information detection apparatus according tothe present invention;

[0018]FIG. 2 is a block configuration diagram showing a networkinformation detection apparatus according to a first embodiment of thepresent invention;

[0019]FIG. 3 is a flowchart showing as a whole the router/DNS serverdetection operation of the first embodiment according to the presentinvention;

[0020]FIG. 4 is a flowchart showing an example of the router featurecheck operation carried out by a router detection section in the firstembodiment of the present invention;

[0021]FIG. 5 is a flowchart showing an example of the DNS server featurecheck operation carried out by a DNS server detection section in thefirst embodiment of the present invention;

[0022]FIG. 6 is a block configuration diagram showing a networkinformation detection apparatus according to a second embodiment of thepresent invention;

[0023]FIG. 7 illustrates an IP address format;

[0024]FIG. 8 illustrates an Ethernet packet format;

[0025]FIG. 9 illustrates an IP packet format;

[0026]FIG. 10A illustrates an ICMP echo request/response packet format;

[0027]FIG. 10B illustrates an ICMP Time Exceed notice, packet format;

[0028]FIG. 10C illustrates an ICMP redirect packet format;

[0029]FIG. 11 illustrates an ARP packet format; and

[0030]FIG. 12 illustrates a DNS protocol header format.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0031] Referring to FIG. 1, a plurality of network devices are connectedto a network transmission line 10, including a network informationdetection apparatus 20, a host A 30, a host B 40, a DNS server 50 and arouter 60. The network information detection apparatus 20 according tothe present invention detects the DNS server 50 and/or the router 60from this subnet.

[0032] As shown in FIG. 2, the network information detection apparatus20 according to the present embodiment has a network interface section21 for connection to the network transmission line 10. The networkinterface section 21 is connected to an ARP request transmission section23, an ARP reply reception section 24, a router detection section 25, aDNS server detection section 26 and a network information transmissionsection 28, which are used to transmit/receive IP and ARP packets asdescribed later. The ARP reply reception section 24 is connected asdescribed later to the router detection section 25 and the DNS serverdetection section 26, whereas the router detection Section 25, the DNSserver detection section 26 and the network information transmissionsection 28 are respectively connected to a network information settingsection 27. The overall operation of the network information detectionapparatus 20 is controlled by a control section 22.

[0033] Under the control of the control section 22, the ARP requesttransmission section 23 repeatedly transmits ARP request packets to apredetermined number of IP addresses within the subnet, which will bedescribed in detail later. It is to be noted that the IP address formatand the ARP request packet format are illustrated respectively in FIGS.7 and 11. In FIG. 7, the subnet mask is a string of values with all bitsin the network part and the subnet part being set and all bits in thehost part being reset. The subnet refers to a logical network capable ofcommunication in the IP layer without routing. As for IP addresses in asubnet, network addresses are identical, with only the host parts beingdifferent from one another.

[0034] The ARP reply reception section 24 receives an ARP reply packetfrom the host A 30, the host B 40, the DNS server 50 or the router 60 asa reply to the ARP request packet transmitted by the ARP requesttransmission section 23. The source IP address of the ARP reply packetis output to the router detection section 25 and the DNS serverdetection section 26. The ARP reply packet format is shown in FIG. 11.

[0035] Assuming the source IP address, input from the ARP replyreception section 24, to be a router detection target IP address, therouter detection section 25 detects the router 60 by repeating routerfeature check for each of the preset number of router detection targetIP addresses (details given later). The IP address of the detectedrouter 60 is output to the network information setting section 27.

[0036] Assuming the source IP address, input from the ARP replyreception section 24, to be a DNS server detection target IP address,the DNS server detection section 26 detects the DNS server 50 byrepeating DNS server feature check for each of the preset number of DNSserver detection target IP addresses (details given later) The IPaddress of the detected DNS server 50 is output to the networkinformation setting section 27.

[0037] The network information setting section 27 outputs to the networkinformation transmission section 28 at least one of the router IPaddress detected by the router detection section 25 and the DNS serverIP address detected by the DNS server detection section 26 so that theaddress or addresses can be set to its own apparatus or that the addressor addresses can be used in other network devices.

[0038] The network information transmission section 28 transmits therouter IP address and/or the DNS server IP address, input from thenetwork information setting section 27, via the network interfacesection 21 so that the address or addresses can be used in other networkdevices.

[0039] A packet flowing over the network transmission line 10 takes theformat of a data link layer packet shown in FIG. 8 when the LAN isEthernet (registered trademark, IEEE802.3), takes the format shown inFIG. 9 in the case of an IP packet and takes the format shown in FIG. 11in the case of an ARP packet.

[0040] Although being provided with both the router detection section 25and the server detection section 26, the network information detectionapparatus 20 may be provided with only either of the two.

[0041] It is to be noted that while not shown in FIG. 2, a servicedetection section may be provided in the network information detectionapparatus 20 according to the present embodiment so as to detect the IPaddress of a device performing a service or function other than theabove on the network.

[0042] Network Information Detecting Operation

[0043] A detailed description will be given below of the operation ofthe present embodiment with reference to the flowcharts shown in FIGS. 3to 5 and the packet formats shown in FIGS. 8 to 12.

[0044] Referring to FIG. 3, first, the control section 22 determines,based on subnet information stored in advance, whether the ARP requesttransmission section 23 has issued an ARP request packet (refer to FIG.11) to all the IP addresses in the subnet (Step S2001). If it is true(YES of step S2001), the operation is terminated.

[0045] If the ARP request packet has not been issued to all the IPaddresses in the subnet (No in Step S2001), the ARP request packet willbe issued collectively to every the preset number of IP addresses in thesubnet (Step S2002). More specifically, if we assume that the subnetmask is 255.255.255.0, the network address 192.168.1.0 and the number ofIP addresses to which the ARP request packet is sent at a time is 100,then the ARP request packet is transmitted to IP addresses from192.168.1.1 to 192.168.1.100 at the first execution of Step S2002, to IPaddresses from 192.168.1.101 to 192.168.1.200 at the second executionand to IP addresses from 192.168.1.200 to 192.168.1.254 at the thirdexecution.

[0046] The control section 22 determines whether one or more ARP replypackets (refer to FIG. 11) have been received as a reply to the ARPrequest (Step S2003) and returns to Step S2001 if there have been no ARPreplies (No in Step S2003).

[0047] When one or more ARP reply packets (refer to FIG. 11) have beenreceived (Yes in Step S2003), the control 1.0 section 22 determineswhether router detection is complete (Step S2004). If router detectionis not complete (No in Step S2004), the control section 22 performsrouter feature check (Step S2005). When router detection is complete(Yes in Step S2004), the control section 22 skips router feature checkand determines whether DNS server detection is complete (Step S2006).

[0048] If DNS server detection is not complete (No in Step S2006), thecontrol section 22 performs DNS server feature check (Step S2007). WhenDNS server detection is complete (Yes in Step S2006), the controlsection 22 skips DNS server feature check and determines whether therouter and the DNS server have been detected (Step S2008).

[0049] When the router and the DNS server have been detected (Yes inStep S2008), the control section 22 terminates the processing. If therouter and the DNS server have not been detected (No in Step S2008), thecontrol section 22 returns to Step S2001 and repeats the above operationuntil the ARP request packet is issued to all the IP addresses in thesubnet or until the router and the DNS server are detected.

[0050] It is to be noted that if a service detection section isprovided, an ARP request packet may be issued at a time to the presetnumber of IP addresses in the subnet, thus performing service orfunction detection to the source IP address contained in each ARP replypacket that is a reply to the ARP request packet issued.

[0051] (1) Router Feature Check

[0052] In FIG. 4, IP addresses to be searched for routers are source IPaddresses contained respectively in all the ARP reply packets receivedby the ARP reply reception section 24. When these router search IPaddresses are entered (Step 52020), it is determined whether routerfeature check has been performed for all the router search IP addresses(Step S2021). When router feature check is complete for all the IPaddresses (Yes in Step S2021), the router detection section terminatesthe router feature check operation.

[0053] If some router search IP addresses have yet to be inspected (Noin Step S2021), an ICMP echo request packet (refer to FIG. 10A), withits TTL (Time to Live) set in advance to a desired value, is transmittedat a time to the preset number of router search IP addresses (StepS2022). Here, TTL is assumed to be 2, that is, the number of routersteps through which a packet can pass is assumed to be 2.

[0054] For example, if the router search IP addresses are from192.1.68.1.10 to 192.168.1.24 and from 192.168.1.40 to 192.168.1.51 andif router feature check is conducted collectively on ten IP addresses,Step 52022 is executed by transmitting an ICMP echo request at a time toIP addresses from 192.168.1.10 to 192.168.1.19 at the first execution,to IP addresses from 192.168.1.20 to 192.168.1.24 and from 192.168.1.40to 192.168.1.44 at the second execution and to IP addresses from192.168.1.45 to 192.168.1.51 at the third execution.

[0055] After the ICMP echo request packet has been transmittedcollectively, the router detection section 25 determines whether an ICMPredirect message (refer to FIG. 10C) is received within a predeterminedtime period in response to the ICMP echo request packet (Step S2023).

[0056] If no ICMP redirect message has been received (No in Step S2023),the router detection section 25 determines whether an ICMP Time Exceedmessage (FIG. 10B) has been received within a predetermined time periodin response to the ICMP echo request (Step S2024). If no ICMP TimeExceed message has been received (No in Step S2024), the control of therouter detection section 25 returns to Step S2021. When the ICMP TimeExceed message has been received within a predetermined time period (Yesin Step S2024), the router detection section 25 terminates the routerfeature check operation, concluding that the source IP address containedin the Time Exceed message packet is the router IP address (Step S2025).

[0057] When the ICMP redirect message has been received (Yes in StepS2023), the router detection section 25 terminates the router featurecheck operation, concluding that the router IP address contained in theICMP redirect message is the router IP address (Step S2026).

[0058] Thus, router detection is carried out by ICMP redirect and ICMPTime Exceed message received within a predetermined time period aftertransmission of ICMP echo request packet that is a packet whose TTL isset to a given value, ensuring fast router detection. Besides, routersalways support the ICMP Time Exceed message function, allowing reliablerouter detection.

[0059] (2) DNS Server Feature Check

[0060] Referring to FIG. 5, first, IP addresses to be searched for DNSserver are source IP addresses contained respectively in all the ARPreply packets received by the ARP reply reception section 24. When theseDNS server search IP addresses are entered (Step S2040), the DNS serverdetection section 26 determines whether DNS server feature check hasbeen performed for all the DNS server search IP addresses (Step 32041).When DNS server feature check is complete for al the IP addresses (Yesin Step S2041), the DNS server detection section 26 terminates the DNSserver feature check operation.

[0061] If some DNS server search IP addresses have yet to be inspected(No in Step S2041), a DNS query (refer to FIG. 12), with its QR(Question/Response) bit reset, is transmitted at a time to a presetnumber of DNS server search IP addresses (Step S2042). This DNS querywith reset QR bit is a query message such as a standard query(OPCODE=0), inverse query (OPCODE=1), server status request (OPCODE=2)or update.

[0062] As for collective transmission, for example, if the DNS serversearch IP addresses are from 192.168.1.10 to 192.168.1.24 and from192.168.1.40 to 192.168.1.51 and if DNS server feature check isconducted collectively on ten IP addresses, the DNS query is transmittedat a time to IP addresses from 192.168.1.10 to 192.168.1.19 at the firstexecution, to IP addresses from 192.168.1.20 to 192.168.1.24 and from192.168.1.40 to 192.168.1.44 at the second execution and to IP addressesfrom 192.168.1.45 to 192.168.1.51 at the third execution.

[0063] When the DNS query is transmitted at a time, the DNS serverdetection section 26 determines whether a DNS response has been receivedwithin a predetermined time period in response to the DNS query (StepS2043). If no reply has been received (No in Step S2043), the control ofthe DNS server detection section 26 returns to Step S2041. When a DNSresponse has been received within a predetermined time period inresponse to the DNS query (Yes in Step 2043), the DNS server detectionsection 26 terminates the DNS server feature check operation, concludingthat the source IP address contained in the DNS response packet is theDNS server IP address (Step S2045).

[0064] Thus, DNS server detection is carried out by response receivedwithin a predetermined time period after transmission of DNS protocolquery message, ensuring fast router detection. Besides, DNS serversalways support the response function to respond to a received querymessage, allowing reliable DNS server detection.

[0065] As shown in FIG. 6, the network information detection apparatus20 according to a second embodiment of the present embodiment includes anetwork interface 201 for connection to the network transmission line 10and a send/receive control section 202 for transmitting/receiving IP orARP packets described above, and a program-controlled processor 203controlling the detection and setting of network information discussedearlier.

[0066] The program-controlled processor 203 runs router and DNS serverdetection programs and necessary service detection programs read from aprogram memory 204, allowing the network information detection operationas shown in FIGS. 3 to 5. Network information thus detected is stored ina network information memory 205 and is set to its own apparatus.Alternatively, network information is transmitted for setting of othernetworked devices. Description of the network information detectionoperation, carried out by the program-controlled processor 203, will beomitted here since the operation has been described already withreference to FIGS. 3 to 5.

[0067] As described above in detail, according to the present invention,it is possible to ensure fast IP address detection by successivelyselecting a preset number of IP addresses from among available IPaddresses on the network, detecting search IP addresses from a selectedset of the preset number of IP addresses, and detecting the IP addressof an intended target device from the detected search IP addresses.

[0068] Further, according to the present invention, it is possible toensure fast router detection thanks to router detection by ICMP redirectrequest and ICMP Time Exceed message that are replies to ICMP echorequest. Additionally, routers always support the ICMP Time Exceedmessage function, allowing reliable router detection.

[0069] In addition, according to the present invention, it is possibleto ensure fast DNS server detection thanks to DNS server detection byresponse to DNS protocol query message. Additionally, DNS servers alwayssupport the response function to respond to query message, allowingreliable DNS server detection.

[0070] Thus, fast and automatic detection of DNS server and router IPaddresses reduces wait time for users, eliminates the manual tasks ofentering a DNS server/router IP address by users and prevents confusionin the network or upsurge in load as a result of erroneous addressentry. The network information detection apparatus according to thepresent invention is particularly effective for connecting a networkdevice, purchased from a distributor, to the user network and moving anetwork device from one network to another.

[0071] While illustrative and presently preferred embodiments of thepresent invention have been described in detail herein, it is to beunderstood that the inventive concepts may be otherwise variouslyembodied and employed and that the appended claims are intended to beconstrued to include such variations except insofar as limited by theprior art.

1. An apparatus for detecting an IP (Internet Protocol) address of adevice connected to a network, comprising: a search IP address detectorfor detecting at least one search IP address from IP addresses which areselected every a predetermined number of IP addresses as a unit frompossible IP addresses on the network; an IP address detector fordetecting an IP address of a target device from the at least one searchIP address detected; and a controller for terminating a networkinformation detection operation either when all possible IP addresses onthe network have been selected or when the IP address of the targetdevice has been detected.
 2. The apparatus according to claim 1, whereinthe IP address detector includes at least one of: a DNS server detectorfor detecting an IP address of a DNS (Domain Name System) server; and arouter detector for detecting an IP address of a router.
 3. Theapparatus according to claim 2, wherein the IP address detector furtherincludes a service detector for detecting an IP address of a deviceproviding a service other than services of the DNS server and therouter.
 4. An apparatus for detecting an IP (Internet Protocol) addresson a network including at least a DNS (Domain Name System) server,comprising: a search IP address detector for detecting at least onesearch IP address from possible IP addresses on the network; a DNSmessage communication section for sending a DNS query message to the atleast one search IP address and receiving a response message to the DNSquery message; and a DNS server detector for discriminating a DNSresponse message from the response message to detect an IP address of aDNS server originating the DNS response message.
 5. The apparatusaccording to claim 4, wherein the search IP address detector sends anARP (Address Resolution Protocol) request at a time to IP addresseswhich are selected every a predetermined number of IP addresses as aunit from the possible IP addresses on the network, and detects the atleast one search IP address from an ARP response to the ARP request. 6.The apparatus according to claim 4, wherein the DNS query message is amessage with resetting QR bit of DNS protocol header, which is a messageof at least one type selected from a group of standard query, inversequery, server status request and update.
 7. The apparatus according toclaim 4, further comprising: an ICMP message communication section forsending an ICMP echo query message to the at least one search IP addressand receiving an ICMP response message to the ICMP echo query message;and a router detector for detecting an IP address of a routeroriginating the ICMP response message.
 8. The apparatus according toclaim 5, further comprising. an ICMP message communication section forsending an ICMP echo query message to the at least one search IP addressand receiving an ICMP response message to the ICMP echo query message;and a router detector for detecting an IP address of a routeroriginating the ICMP response message.
 9. The apparatus according toclaim 7, wherein the ICMP response message is one of an ICMP redirectrequest message and an ICMP time exceed message.
 10. The apparatusaccording to claim 8, wherein the ICMP response message is one of anICMP redirect request message and an ICMP time exceed message.
 11. Amethod for detecting an IP (Internet Protocol) address of a deviceconnected to a network, comprising: selecting IP addresses in unit of apredetermined number of IP addresses from possible IP addresses on thenetwork; detecting at least one search IP address from a selected set ofIP addresses; detecting an IP address of a target device from the atleast one search IP address detected; and terminating a networkinformation detection operation either when all possible IP addresses onthe network have been selected or when the I? address of the targetdevice has been detected.
 12. A method for detecting an IP (InternetProtocol) address on a network including at least a DNS (Domain NameSystem) server, comprising: detecting at least one search IP addressfrom possible IP addresses on the network; sending a DNS query messageto the at least one search IP address; receiving a response message tothe DNS query message; and discriminating a DNS response message fromthe response message to detect an IP address of a DNS server originatingthe DNS response message.
 13. The method according to claim 12, whereinthe step of detecting the at least one search IP address comprises:sending an ARP (Address Resolution Protocol) request at a time to IPaddresses which are selected every a predetermined number of IPaddresses as a unit from the possible IP addresses on the network; anddetecting the at least one search IP address from an ARP response to theARP request.
 14. A program instructing a computer to a networkinformation detection operation for detecting an IP (Internet Protocol)address of a device connected to a network, comprising the steps of:selecting IP addresses in unit of a predetermined number of IP addressesfrom possible IP addresses on the network; detecting at least one searchIP address from a selected set of IP addresses; detecting an IP addressof a target device from the at least one search IP address detected; andterminating a network information detection operation either when allpossible IP addresses on the network have been selected or when the IPaddress of the target device has been detected.
 15. A programinstructing a computer to a network information detection operation fordetecting an IP (Internet Protocol) address on a network including atleast a DNS (Domain Name System) server, comprising the steps of:detecting at least one search IP address from possible IP addresses onthe network; sending a DNS query message to the at least one search IPaddress; receiving a response message to the DNS query message; anddiscriminating a DNS response message from the response message todetect an IP address of a DNS server originating the DNS responsemessage.
 16. The program according to claim 15, wherein the step ofdetecting the at least one search IP address comprises: sending an ARP(Address Resolution Protocol) request at a time to IP addresses whichare selected every a predetermined number of IP addresses as a unit fromthe possible IP addresses on the network; and detecting the at least onesearch IP address from an ARP response to the ARP request.